package tech.springboot.springtasks;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import tech.springboot.springtasks.schedule.AsyncDemo;

/**
 * @author pdai
 */
@SpringBootApplication
public class AsyncApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(AsyncApplication.class, args);
        AsyncDemo bean = run.getBean(AsyncDemo.class);
        bean.test();
        bean.test2();
        bean.performLongRunningTask();
    }
}
